package receiver;

import static com.qb.devserv.MainActivity.mActivity;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageInstaller;
import android.widget.Toast;

import com.qb.devserv.MainActivity;

import utils.DevActionUtil;
import utils.MyUtil;

public class NotificationReceiver extends BroadcastReceiver {
    @Override
    public void onReceive(Context context, Intent intent) {
        String action = intent.getAction();
        MyUtil.showLog("NotificationReceiver action", action);
        if (intent != null) {
            if (action.equals("UP_DEVICE_DETAIL")) {
                mActivity.upLoadDevDetail();
//                DevActionUtil.bootAnimationAction(mActivity，2);
                Toast.makeText(context, "设备信息已上传", Toast.LENGTH_SHORT).show();
            }
        } else {
            MyUtil.showLog("NotificationReceiver intent == null", "");
        }
    }
}
